Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODUndo


PeekUndoHistory

The PeekUndoHistory method returns a Boolean value that indicates whether there is anything on the undo stack and gets information about the action at the top of the undo stack.

ODBoolean PeekUndoHistory (out ODPart part,
                           out ODActionData actionData, 
                           out ODActionType actionType, 
                           out ODName actionLabel);
part
A reference to the part that performed the action at the top of the undo stack.
actionData
A byte array whose buffer is to contain the action data for the action at the top of the undo stack.
actionType
The possible type of undo action. The value of actionType must be one of the following: kODSingleAction, kODBeginAction, or kODEndAction.
actionLabel
A user-visible label for the undo command beginning with the word Undo.
return value
kODTrue if there is anything on the undo stack, otherwise kODFalse.
DISCUSSION
The value kODSingleAction for the actionType parameter indicates that the action was a single action. The value kODBeginAction indicates that the action was the first action of a multistep action. The value kODEndAction indicates that the action was the last action of a multistep action.

The document shell or container applications call this method to properly set up the Undo item. Your part can also call this method, but it is probably unnecessary.

If the top of the undo stack contains a mark indicating an action subhistory, this method returns kODFalse.

SEE ALSO
The ODActionData type (page 898).
The ODActionType type (page 898).
The ODName type (page 876).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help